//
//  BluetoothInfoModel.h
//  Deviceinfo
//
//  Created by Mac on 2020/11/18.
//  Copyright © 2020 QinGeng. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "JDefine.h"
// BLE
#import <CoreBluetooth/CoreBluetooth.h>

typedef void(^ BlockDeviceDic)(NSMutableDictionary <NSString *, CBPeripheral *>* _Nonnull obj);

NS_ASSUME_NONNULL_BEGIN

@interface BluetoothInfoModel : NSObject

JSingletonH()

// CBCentralManager实例来进行蓝牙管理；
@property (nonatomic, strong) CBCentralManager *centralManager;

- (void)connectDeviceWithPeripheral:(CBPeripheral *)peripheral;

// 外设字典
@property (nonatomic, strong) NSMutableDictionary <NSString *, CBPeripheral *>*deviceDic;

@property (nonatomic, copy) BlockDeviceDic deviceBlock;

- (void)scanDevice;
- (void)stopScanPeripheral;

@end

NS_ASSUME_NONNULL_END
